class CreateBugColumns < ActiveRecord::Migration
  def self.up
    create_table :bug_columns do |t|
      t.integer :application_id, :null => false
      t.integer :position
      t.string :field_name, :null => false
      t.string :display_name, :null => false
      t.string :qddts_query_field_name
      t.integer :minimum_width
      t.string :access_function
      t.string :description
      t.boolean :sortable
      t.boolean :dont_pass_field
      t.integer :sort_order
      t.string :sort_function
      
      t.timestamps

    end
    directory = File.join(File.dirname(__FILE__), "../constant_fixtures") 
    Fixtures.create_fixtures(directory, "bug_columns")
  end

  def self.down
    drop_table :bug_columns
  end
end
